package com.tanhua.model.mongo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "video_like")
public class VideoLike implements Serializable {

    private ObjectId id;
    @Indexed
    private Long userId; //用户id，自己
    @Indexed
    private ObjectId videoId; //喜欢、评论的视频id
    private Integer type; // 操作类型 1-点赞， 2-评论
    private String content; //评论内容
    private Integer likeCount = 0; //点赞数量
    private Long created; //创建时间
    private Long updated; // 更新时间

}